#ifndef _UFL_Base_Type_H_
#define _UFL_Base_Type_H_

#define GLM_FORCE_RADIANS

#ifdef __APPLE_CC__
    #include <OpenGL/gl3.h>
    #include <OpenGL/glu.h>
#elif _WIN32
    #include <glew.h>
#endif

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <stdio.h>
#include <stdlib.h>

#include <glfw3.h>

#include "glm.hpp"
#include "gtc/type_ptr.hpp"

namespace ufl
{

	// Customize type name
	typedef char ufl_char;
	typedef unsigned char ufl_ubyte;
	typedef ufl_char ufl_byte;
	typedef ufl_byte* ufl_bytep;
	typedef ufl_byte** ufl_bytepp;
    typedef ufl_ubyte* ufl_ubytep;

	typedef void ufl_void;
	typedef void* ufl_voidp;

	typedef int ufl_int32;
	typedef unsigned int ufl_uint32;
	typedef ufl_uint32* ufl_uint32p;

	typedef long long ufl_int64;
	typedef unsigned long long ufl_uint64;

	typedef float ufl_float;
	typedef ufl_float* ufl_floatp;

	typedef bool ufl_boolean;
    
    typedef std::string ufl_string;

	typedef glm::vec4 ufl_vertex_4f, ufl_color_4f;
	typedef glm::vec3 ufl_vertex_3f, ufl_color_3f;
	typedef glm::vec2 ufl_vertex_2f, ufl_color_2f;
	typedef glm::i32vec2 ufl_vertex_2i;
	typedef glm::mat3 ufl_matrix_3fv;
	typedef glm::mat4 ufl_matrix_4fv;

	// Position and Color
	typedef struct _V4F_C4F_
	{
		ufl_vertex_4f v;
		ufl_color_4f c;
	} V4F_C4F;

	// Position、Color and Texture Coordination
	typedef struct _V4F_C4F_T2F_
	{
		ufl_vertex_4f v;
		ufl_color_4f c;
		ufl_vertex_2f t;
	} V4F_C4F_T2F;

	// Position、Color 、Texture Coordination and Normal
	typedef struct _V4F_T2F_N3F
	{
		ufl_vertex_4f v;
		ufl_vertex_2f t;
		ufl_vertex_3f n;
	} V4F_T2F_N3F;
}

#endif